from flask import (Blueprint, request, session)
import json

bp = Blueprint('getLoad',__name__, url_prefix='/getLoad')

@bp.route('', methods = ['POST'])
def getLoad():
    sheets = []
    sheet_names = []
    if('sheets' in session.keys()):
        sheets = session['sheets']

    for sheet in sheets:
        sheet_names.append(sheet['showName'])

    return {
        'code': 200,
        'msg': '获取成功',
        'data': {
            'data': sheets,
            'names': sheet_names
        }
    }